[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 restorecrtmode()        Restore System Mode to Pre-initgraph() Setting

 void       far restorectrmode(void);

    restorecrtmode() restores the original screen mode that existed prior
    to calling initgraph().  Most often, this represents the text mode.
    restorecrtmode() and setgraphmode() can be alternately called to
    switch between text and graphics mode.

    Returns:     Nothing.

   -------------------------------- Example ---------------------------------

    The following statements save the current graphics mode before
    changing it to text mode  and restore it to graphics mode before the
    program terminates.

           #include <graphics.h>

           int gdriver = DETECT;
           int gmode;

           main()
           {
               int savemode;

               initgraph(&gdriver,&gmode,"");
               savemode = getgraphmode();
               restorecrtmode();
               setgraphmode(savemode);
               closegraph();
           }


See Also: getgraphmode() setgraphmode()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson